home *** CD-ROM | disk | FTP | other *** search
- VERSION 2.00
- Begin Form frmPathWord
- BackColor = &H00C0C0C0&
- BorderStyle = 3 'Fixed Double
- Caption = "Split Path Word"
- ClientHeight = 2760
- ClientLeft = 1110
- ClientTop = 1470
- ClientWidth = 5790
- Height = 3165
- Left = 1050
- LinkTopic = "Form1"
- ScaleHeight = 2760
- ScaleWidth = 5790
- Top = 1125
- Width = 5910
- Begin PictureBox Picture1
- BackColor = &H00C0C0C0&
- Height = 1575
- Left = 240
- ScaleHeight = 1545
- ScaleWidth = 3825
- TabIndex = 10
- Top = 1080
- Width = 3855
- Begin OptionButton optSplit
- BackColor = &H00C0C0C0&
- Caption = "Return the File Extension."
- Height = 255
- Index = 3
- Left = 120
- TabIndex = 4
- Top = 1200
- Width = 3375
- End
- Begin OptionButton optSplit
- BackColor = &H00C0C0C0&
- Caption = "Return the File Name."
- Height = 255
- Index = 2
- Left = 120
- TabIndex = 3
- Top = 840
- Width = 3375
- End
- Begin OptionButton optSplit
- BackColor = &H00C0C0C0&
- Caption = "Return the Directory."
- Height = 255
- Index = 1
- Left = 120
- TabIndex = 2
- Top = 480
- Width = 3375
- End
- Begin OptionButton optSplit
- BackColor = &H00C0C0C0&
- Caption = "Return the Drive."
- Height = 255
- Index = 0
- Left = 120
- TabIndex = 1
- Top = 120
- Width = 3375
- End
- End
- Begin CommandButton cmdCancel
- Caption = "&Exit"
- Height = 375
- Left = 4440
- TabIndex = 6
- Top = 2040
- Width = 1095
- End
- Begin CommandButton cmdOK
- Caption = "&OK"
- Height = 375
- Left = 4440
- TabIndex = 5
- Top = 1320
- Width = 1095
- End
- Begin TextBox txtPath
- Height = 285
- Left = 1800
- TabIndex = 0
- Text = "Text1"
- Top = 240
- Width = 3735
- End
- Begin Label Label3
- BackColor = &H00C0C0C0&
- Caption = "Returned Word"
- Height = 255
- Left = 240
- TabIndex = 9
- Top = 720
- Width = 1455
- End
- Begin Label Label2
- BackColor = &H00C0C0C0&
- Caption = "Enter Path:"
- Height = 255
- Left = 240
- TabIndex = 8
- Top = 240
- Width = 1455
- End
- Begin Label lblSplitWord
- BackColor = &H00C0C0C0&
- BorderStyle = 1 'Fixed Single
- Height = 255
- Left = 1800
- TabIndex = 7
- Top = 720
- Width = 3735
- End
- '''''''''''''''''''''''''''''''''''''''''''''''''
- ' Copyright by Advanced Applications 1994 - 1995
- ' All rights reserved
- '''''''''''''''''''''''''''''''''''''''''''''''''
- Dim nValue As Integer
- Sub cmdCancel_Click ()
- Me.Hide
- DoEvents
- End Sub
- Sub cmdOK_Click ()
- szBuffer$ = String(255, 0)
- If txtPath.Text = "" Then Exit Sub
- strPath$ = txtPath.Text
- nLength% = PathSplit(strPath$, szBuffer$, nValue)
- If nLength% = 0 Then
- MsgBox "Cannot Split request", MB_ICONSTOP, "Split Return Error"
- Exit Sub
- End If
- strWord$ = Left$(szBuffer$, nLength%)
- lblSplitWord.Caption = strWord$
- End Sub
- Sub Form_Load ()
- Left = (Screen.Width - Width) / 2 ' Center form horizontally.
- Top = (Screen.Height - Height) / 2 ' Center form vertically.
- optSplit(1).Value = True ' Default to Directory
- nValue = 1
- txtPath.Text = ""
- End Sub
- Sub optSplit_Click (Index As Integer)
- nValue = Index
- End Sub
-